home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat3 / Tcl / tclxinit.z / tclxinit
Encoding:
Text File  |  1998-10-30  |  8.2 KB  |  199 lines

  1.  
  2.  
  3.  
  4. TTTTccccllllXXXXIIIInnnniiiitttt((((3333TTTTccccllll))))                                                  TTTTccccllllXXXXIIIInnnniiiitttt((((3333TTTTccccllll))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      TclX_Init, TclXCmd_Init, TclXLib_Init, TclX_Main - Extended Tcl
  10.      initialization.
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      -ltclx -ltcl
  14.  
  15.      #include "tclExtend.h"
  16.  
  17.      extern char *tclAppName;
  18.      extern char *tclAppLongname;
  19.      extern char *tclAppVersion;
  20.      extern int   tclAppPatchlevel;
  21.  
  22.      extern char *tclX_library;
  23.      extern char *tclX_libraryEnv;
  24.  
  25.      int
  26.      Tcl_AppInit (Tcl_Interp *interp);
  27.  
  28.      int
  29.      TclX_Init (Tcl_Interp *interp);
  30.  
  31.      int
  32.      TclXCmd_Init (Tcl_Interp *interp);
  33.  
  34.      int
  35.      TclXLib_Init (Tcl_Interp *interp);
  36.  
  37.      void
  38.      TclX_Main (int               argc,
  39.                 char            **argv,
  40.                 Tcl_AppInitProc  *appInitProc);
  41.  
  42. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  43.      These functions are used to initialize Extended Tcl and applications
  44.      based on Extended Tcl.
  45.  
  46.      IMPORTANT NOTE:  lllliiiibbbbttttccccllllxxxx....aaaa must be specified on the link command line
  47.      before lllliiiibbbbttttccccllll....aaaa.  If the order is reversed, incorrect command line
  48.      parsing code will be used.
  49.  
  50.    ttttccccllllAAAAppppppppNNNNaaaammmmeeee
  51.      The application name to be returned by the iiiinnnnffffooooxxxx command. This should be
  52.      a short mnemonic.  This value maybe altered from the default by the
  53.      application.
  54.  
  55.    ttttccccllllAAAAppppppppLLLLoooonnnnggggnnnnaaaammmmeeee
  56.      The application long name to be returned by the iiiinnnnffffooooxxxx command.  This
  57.      should be a natural language string.  This value maybe altered from the
  58.      default by the application.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. TTTTccccllllXXXXIIIInnnniiiitttt((((3333TTTTccccllll))))                                                  TTTTccccllllXXXXIIIInnnniiiitttt((((3333TTTTccccllll))))
  71.  
  72.  
  73.  
  74.    ttttccccllllAAAAppppppppVVVVeeeerrrrssssiiiioooonnnn
  75.      The application version string to be returned by the iiiinnnnffffooooxxxx command.
  76.      procedures are called.  This value maybe altered from the default by the
  77.      application.
  78.  
  79.    ttttccccllllAAAAppppppppPPPPaaaattttcccchhhhlllleeeevvvveeeellll
  80.      The application patchlevel to be returned by the iiiinnnnffffooooxxxx command.
  81.      procedures are called.  This value maybe altered from the default by the
  82.      application.
  83.  
  84.    ttttccccllllXXXX____lllliiiibbbbrrrraaaarrrryyyy
  85.      The path to the TclX runtime library.  This directory contains the
  86.      initialization file evaluated by TclX_Init and is also appended to
  87.      auto_path.  This variable is initialized to the compile-time specified
  88.      install location.  The value maybe modified before TclX_Init or
  89.      TclXLib_Init are called to use another library in a particular
  90.      application.  If its set to NULL, no library will be used unless override
  91.      by tclX_libraryEnv.  Setting tclX_libraryEnv and this variable to NULL
  92.      causes no library directory or initialization file to be used.
  93.  
  94.    ttttccccllllXXXX____lllliiiibbbbrrrraaaarrrryyyyEEEEnnnnvvvv
  95.      Environment variable used to override the path stored in tclX_library.
  96.      The value maybe modified before TclX_Init or TclXLib_Init are called to
  97.      use another environment variable for a particular application.  If its
  98.      set to NULL, no environment variable will allow to override.  Defaults to
  99.      "TCL_LIBRARY".
  100.  
  101.    ttttccccllllXXXX____iiiinnnniiiittttFFFFiiiilllleeee
  102.      The initialization file for TclX_Init to source.  By default the file
  103.      "TclInit.tcl" in the TclX library directory is sourced.  If set to an
  104.      absolute path, it is not assumed to be in the TclX library directory and
  105.      is independent of a library path being specified.  If set to NULL, not
  106.      initialization file is evaluated.
  107.  
  108.    TTTTccccllll____AAAAppppppppIIIInnnniiiitttt
  109.      This function is used to initialize an TclX based application.  It is
  110.      intended to the the only file that is modified for most applications.
  111.      There are two versions of this function, one for applications built on
  112.      just TclX and the other for applications built on TclX and Tk.
  113.  
  114.      The TclX version of this function is found in ttttccccllllXXXXAAAAppppppppIIIInnnniiiitttt....cccc and the Tk
  115.      version is found in ttttkkkkXXXXAAAAppppppppIIIInnnniiiitttt....cccc.  It should be modified according to the
  116.      instructions in these files to initialize a TclX based application.
  117.  
  118.      A custom application is then linked in a manner similar to:
  119.  
  120.        cc tclXAppInit.o mystuff.a libtclx.a libtcl.a ${SYSLIBS} -o myapp
  121.  
  122.      or
  123.  
  124.        cc tkXAppInit.o mystuff.a libtkx.a libtk.a libtclx.a libtcl.a \
  125.           ${SYSLIBS} -o myapp
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. TTTTccccllllXXXXIIIInnnniiiitttt((((3333TTTTccccllll))))                                                  TTTTccccllllXXXXIIIInnnniiiitttt((((3333TTTTccccllll))))
  137.  
  138.  
  139.  
  140.    TTTTccccllllXXXX____IIIInnnniiiitttt
  141.      Initializes Extended Tcl, adding the extended command set to the
  142.      interpreter.  This is called from TTTTccccllll____AAAAppppppppIIIInnnniiiitttt.
  143.  
  144.      Parameters
  145.        oooo _i_n_t_e_r_p - A pointer to the interpreter to add the commands to.
  146.  
  147.      Returns:
  148.        TTTTCCCCLLLL____OOOOKKKK if all is ok, TTTTCCCCLLLL____EEEERRRRRRRROOOORRRR if an error occurred.
  149.  
  150.    TTTTccccllllXXXXCCCCmmmmdddd____IIIInnnniiiitttt
  151.      Add the TclX command set to the interpreter, with the exception of the
  152.      TclX library management commands.  This is normally called by TTTTccccllllXXXX____IIIInnnniiiitttt
  153.      and should only be used if you don't want the TclX library handling.
  154.  
  155.      Parameters
  156.        oooo _i_n_t_e_r_p - A pointer to the interpreter to add the commands to.
  157.  
  158.      Returns:
  159.        TTTTCCCCLLLL____OOOOKKKK if all is ok, TTTTCCCCLLLL____EEEERRRRRRRROOOORRRR if an error occurred.
  160.  
  161.    TTTTccccllllXXXXLLLLiiiibbbb____IIIInnnniiiitttt
  162.      Add the TclX library management commands to the interpreter.  This is
  163.      normally called by TTTTccccllllXXXX____IIIInnnniiiitttt.  It also sets the Tcl variable
  164.      "tclx_library" to TclX library directory.
  165.  
  166.      Parameters
  167.        oooo _i_n_t_e_r_p - A pointer to the interpreter to add the commands to.
  168.  
  169.      Returns:
  170.        TTTTCCCCLLLL____OOOOKKKK if all is ok, TTTTCCCCLLLL____EEEERRRRRRRROOOORRRR if an error occurred.
  171.  
  172.    TTTTccccllllXXXX____MMMMaaaaiiiinnnn
  173.      This function parses the command line according to the TclX shell
  174.      specification.  It creates an interpreter and calls the specified
  175.      function aaaappppppppIIIInnnniiiittttPPPPrrrroooocccc to initialize any application specific commands.  It
  176.      then either evaluates the command of script specified on the command line
  177.      or enters an interactive command loop.  This procedure never returns, it
  178.      exits the process when it's done.
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.